﻿package com.reyco1.util
{
	
	public class ProxyUtil
	{
		/**
		 * Proxy a function
		 * @param $function : function to run 
		 * @param $rest : arguments
		 * @return a reference to the function
		 * 
		 */		
		public static function create($function:Function,... $rest):Function
		{
			return function(... $moreRest):void
			{
				$function.apply(this, $moreRest.concat($rest));
			}
		}
	}
}